<div class="pl-3 pr-3 bg-white">
    <h4>用户信息</h4>
    <ts-tabs [tabs]="['新增用户','员工权限']" [color]="global.params.color" [target]="tsTabs" activeTab="新增用户">
    </ts-tabs>
</div>
<div class="p-2">
    <div #tsTabs='tsTabs' tsTabs class="card">
        <div class="card-body">
            <div tsTab tab='新增用户'>
                <div class="card-body">
                    <div class="container m-0">
                        <div style="text-align: center;height: 45px;font-weight: 900">登入信息</div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">登入账号</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="gooduserMsg.account" type="text" class="form-control" placeholder="请输入登入账号">
                                <label class="col-sm-2 col-form-label label-required text-right">初始密码</label>
                                <input [(ngModel)]="goods.password" type="text" class="form-control" placeholder="请输入初始密码">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">手机号码</label>
                            <div class="col-sm-7" style="display: flex">
                                <input [(ngModel)]="goods.phone" style="width: 61%;" type="text" class="form-control" placeholder="请输入手机号码">
                                <label class="col-sm-3 col-form-label label-required text-right">账号状态</label>
                                <ts-switch [color]="global.params.color" style="padding-top: 10px" [values]="{open:'1',close:'0'}" [(ngModel)]="goods.status"></ts-switch>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">选择模块</label>
                            <div class="col-sm-10 pt-2">
                                <!-- <ts-checkbox class="mr-5" *ngFor="let sel of selectModules;index as i" color="secondary" [value]="i+1" [(ngModel)]="sel.name">{{sel.name}}</ts-checkbox> -->
                                <ts-checkbox class="mr-5" *ngFor="let sel of selectModules;index as i" color="secondary" [value]="i+1" [(ngModel)]="goods.module ">
                                    {{sel.name}}

                                </ts-checkbox>
                            </div>
                        </div>
                        <div style="text-align: center;height: 45px;font-weight: 900">基本信息</div>


                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">姓名</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.staffName" type="text" class="form-control" placeholder="请输入姓名">
                                <label class="col-sm-2 col-form-label label-required text-right">所在部门</label>
                                <select [(ngModel)]="goods.departmentId" (change)="getPosition(goods.departmentId)" class="custom-select" placeholder="请选择">
                                    <option value="" style="color: #b6b6b6" disabled selected selected="selected">请选择部门</option>
                                    <option *ngFor="let item of getlista" [ngValue]="item.id">{{item.departmentName}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">上级</label>
                            <div class="col-sm-7" style="display: flex">
                                <select style="width: 60%" [(ngModel)]="goods.superiorId" class="custom-select">
                                    <option *ngFor="let type of staff" [ngValue]="type.id">{{type.staffName}}</option>
                                </select>
                                <label class="col-sm-3 col-form-label label-required text-right">是否部门领导</label>
                                <ts-switch [color]="global.params.color" style="padding-top: 10px" [values]="{open:1,close:0}" [(ngModel)]="goods.isLeader"></ts-switch>
                            </div>
                        </div>`
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">手机号</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.phone" type="text" class="form-control" placeholder="请输入手机号">
                                <label class="col-sm-2 col-form-label label-required text-right">QQ</label>
                                <input [(ngModel)]="goods.qq" type="text" class="form-control" placeholder="请输入QQ">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">微信</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.wechat" type="text" class="form-control" placeholder="请输入微信">
                                <label class="col-sm-2 col-form-label label-required text-right">工号</label>
                                <input [(ngModel)]="goods.workNumber" type="text" class="form-control" placeholder="请输入工号">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">身份证</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.idCard" type="text" class="form-control" placeholder="请输入身份证">
                                <label class="col-sm-2 col-form-label label-required text-right">生日</label>
                                <input [(ngModel)]="goods.birthday" type="text" class="form-control" placeholder="请输入生日">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">职位</label>
                            <div class="col-sm-10" style="display: flex">
                                <select [(ngModel)]="goods.positionId" class="custom-select" placeholder="请选择">
                                    <option *ngFor="let item of position" [ngValue]="item.id">{{item.positionName}}</option>
                                </select>
                                <label class="col-sm-2 col-form-label label-required text-right">角色</label>
                                <select [(ngModel)]="gooduserMsg.roleId" class="custom-select">
                                    <option value="" style="color: #b6b6b6" disabled selected selected="selected">请选择角色</option>
                                    <option *ngFor="let item of role" [ngValue]="item.id">{{item.roleName}}</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">紧急联系人</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.emergencyContact" type="text" class="form-control" placeholder="请输入紧急联系人">
                                <label class="col-sm-2 col-form-label label-required text-right">紧急联系电话</label>
                                <input [(ngModel)]="goods.emergencyContactMobile" type="text" class="form-control" placeholder="请输入紧急联系电话">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">地址</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.address" type="text" class="form-control" placeholder="请输入地址">
                                <label class="col-sm-2 col-form-label label-required text-right">Email</label>
                                <input [(ngModel)]="goods.email" type="text" class="form-control" placeholder="请输入Email">
                            </div>
                        </div>
                    </div>
                </div>


                <div class="mt-2 m-btn">
                    <button routerLink="/userinfo/userinfo" tsBtn color="white">返回列表</button>
                    <button tsBtn loading color="success" (submit)="confirmInsert($event)">确认添加</button>
                    <button *ngIf="goods.id>0" tsBtn loading color="primary" (submit)="confirmUpdate($event)">确认修改</button>
                </div>
            </div>
            <!-- 
            <div tsTab tab='财务信息'>
                <div class="card-body">
                    <div class="container m-0">
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">开票名称</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入开票名称">
                                <div class="invalid-feedback">开票名称是必填的</div>
                                <label class="col-sm-2 col-form-label label-required text-right">发票类型</label>
                                <select [(ngModel)]="goods.goodsParentType" class="custom-select" placeholder="请选择发票类型">
                                    <option *ngFor="let type of parentTypes" [ngValue]="type.value">{{type.text}}</option>
                                </select>
                            </div>
                        </div>

                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">公司地址</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入公司地址">
                                <label class="col-sm-2 col-form-label label-required text-right">税号</label>
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输税号">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">银行账号</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入银行账号">
                                <label class="col-sm-2 col-form-label label-required text-right">开户行名称</label>
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入开户行名称">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">税票地址</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入税票地址">
                                <label class="col-sm-2 col-form-label label-required text-right">税票电话</label>
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入税票电话">
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">对账日期</label>
                            <div class="col-sm-10" style="display: flex">
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入对账日期">
                                <label class="col-sm-2 col-form-label label-required text-right">开票日期</label>
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入开票日期">
                            </div>
                        </div>

                        <div style="text-align: center;height: 45px;">资质附件</div>

                        <div class="card-body">
                            <div class="container m-0">
                                <div class="form-group row">
                                    <label class="col-sm-2 col-form-label label-required text-right">营业执照</label>
                                    <div class="col-sm-10">
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>
                                        <label class="col-sm-2 col-form-label label-required text-right">行业许可证</label>
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>
                                        <label class="col-sm-2 col-form-label label-required text-right">
                                            法人身份证反面照片
                                        </label>
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">有效期</label>
                            <div class="col-sm-8" style="display: flex">
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入有效期">
                                <label class="col-sm-2 col-form-label label-required text-right">有效期</label>
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入有效期">
                                <label class="col-sm-2 col-form-label label-required text-right">有效期</label>
                                <input [(ngModel)]="goods.goodsName" type="text" class="form-control" placeholder="请输入有效期">

                            </div>
                        </div>
                        <div class="card-body">
                            <div class="container m-0">
                                <div class="form-group row">
                                    <label class="col-sm-2 col-form-label label-required text-right">门头照片</label>
                                    <div class="col-sm-10">
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>
                                        <label class="col-sm-2 col-form-label label-required text-right">经营场地照</label>
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>
                                        <label class="col-sm-2 col-form-label label-required text-right">
                                            微店头像
                                        </label>
                                        <ts-image-card #tsUp [(src)]="goods.goodsThumb" [config]="options" title="点击选择"></ts-image-card>

                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label label-required text-right">到期前三个月</label>
                            <div class="col-sm-7" style="padding-top: 10px">
                                <ts-switch [color]="global.params.color" [values]="{open:1,close:0}" [(ngModel)]="goods.isActive"></ts-switch>
                            </div>
                        </div>

                    </div>
                </div>


                <div class="mt-2 m-btn">
                    <button routerLink="/customer/customer" tsBtn color="white">返回列表</button>
                    <button *ngIf="goods.id===0" tsBtn loading color="success" (submit)="confirmInsert($event)">确认添加</button>
                    <button *ngIf="goods.id>0" tsBtn loading color="primary" (submit)="confirmUpdate($event)">确认修改</button>
                </div>
            </div>
        </div>
    </div>
</div> -->